local UiComboxTime = {}

function UiComboxTime:dhTimeZone(startTime, endTime)
  startTime = startTime or 10
  endTime = endTime or 20
  return UiComboxTime:timeZone(startTime,endTime)
end

function UiComboxTime:timeZone(startTime,endTime)
  startTime = startTime or 10
  endTime = endTime or 21

  local sourceData = ''
  local detailData = nil

  local time = tostring(startTime)
  sourceData = time

  detailData = UiComboxTime:timeDetailZone(detailData, startTime, endTime)

  local index = 1
  while true do
    startTime = startTime + 1
    if startTime > endTime then break end
    time = tostring(startTime)
    sourceData = sourceData..','..time
    detailData = UiComboxTime:timeDetailZone(detailData, startTime, endTime)
  end
  return sourceData, detailData
end

function UiComboxTime:timeDetailZone(detailData, startTime, endTime)
  startTime = startTime or 10
  endTime = endTime or 21

  startTime = startTime + 1
  if startTime >= endTime then
    local lasetTime = tostring(endTime)
    if detailData then
      detailData = detailData..'#'..lasetTime
    else
      detailData = lasetTime
    end
    return detailData
  end

  local time = tostring(startTime)
  if detailData then
    detailData = detailData..'#'..time
  else
    RxLog('1111')
    detailData = time
  end

  while true do
    startTime = startTime + 1
    if startTime > endTime then break end
    time = tostring(startTime)
    detailData = detailData .. ',' ..time
  end
  return detailData
end

function UiComboxTime:testTime(startTime, endTime)
  startTime = startTime or 10
  endTime = endTime or 18
  local sourceData, detailData = UiComboxTime:timeZone(startTime,endTime)

  RxLog()

  RxLog('sourceData')
  RxLog(sourceData)
  RxLog()

  RxLog('detailData')
  RxLog(detailData)
  RxLog()
end

return UiComboxTime